import App from "../App";
import Classify from "../pages/classify";
import Deail from "../pages/deail";
import Error from "../pages/error";
import Home from "../pages/home";
import List from "../pages/list";
import Message from "../pages/message";
import MessagePage from "../pages/messagePage";
import Search from "../pages/search";
import User from "../pages/user";
import { createBrowserRouter } from 'react-router-dom'

export const router = createBrowserRouter([
    {
        path: "/",
        element: <App></App>,
        children: [
            {
                index: true,
                element: <Home></Home>
            },
            {
                path: "home",
                element: <Home></Home>
            },
            {
                path: "classify",
                element: <Classify></Classify>
            },
            {
                path: "message",
                element: <Message></Message>
            },
            {
                path: "user",
                element: <User></User>
            },
        ]
    },
    {
        path: "/search",
        element: <Search></Search>
    },
    {
        path: "/list",
        element: <List></List>
    },
    {
        path: "/deail",
        element: <Deail></Deail>
    },
    {
        path: "/messagePage",
        element: <MessagePage></MessagePage>
    },
    {
        path: "*",
        element: <Error></Error>
    },
]);